package org.binglan.youziyuepai.mapper;

import org.apache.ibatis.annotations.Select;
import org.binglan.youziyuepai.entity.PersonalDynamicApply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 * 约拍申请表 Mapper 接口
 * </p>
 *
 * @author sanjin
 * @since 2019-04-24
 */
public interface PersonalDynamicApplyMapper extends BaseMapper<PersonalDynamicApply> {

    @Select("SELECT\n" +
            "\tpda.*\n" +
            "FROM \n" +
            "\tpersonal_dynamic_apply pda,\n" +
            "\tpersonal_dynamic pd\n" +
            "WHERE\n" +
            "\tpd.id = pda.personal_dynamic_id\n" +
            "\tAND\n" +
            "\tpd.user_id = #{userId}")
    List<PersonalDynamicApply> queryReceivePersonalDynamicApplyByUserId(String userId);

}
